Skip to content

Extract aces-transforms into standalone package#8

Closed
c-clark wants to merge 2 commits into
aces-aswf:mainfrom
c-clark:dev/aces-transforms
Closed

Extract aces-transforms into standalone package#8
c-clark wants to merge 2 commits into
aces-aswf:mainfrom
c-clark:dev/aces-transforms

Conversation

@c-clark
Copy link
Copy Markdown
Contributor

@c-clark c-clark commented Mar 4, 2026

Changes

  • Extract aces-amf-transforms into a standalone aces-transforms package
    with zero dependencies, making it usable by any ACES implementer, future ACES version releases, etc
  • Flip the dependency direction: aces-amf-lib optionally depends on
    aces-transforms (via [registry] extra for validation), not the other way around
  • Move TransformIdValidator into aces-amf-lib where it conditionally
    activates when aces-transforms is installed

Structure

Package Dependencies Role
aces-transforms None ACES transform registry (lookup, validation, version mapping)
aces-amf-lib lxml, xsdata, pydantic, optionally aces-transforms via [registry] extra AMF read/write/validate
aces-amf-utils click, aces-amf-lib, aces-transforms CLI tools and utilities

Additions

  • Add version-scoped queries (version= kwarg) with fuzzy resolution —
    v1.3 resolves to latest patch (v1.3.1), v2.0.0 resolves to latest
    build (v2.0.0+2025.04.04)
  • Add version migration helpers (get_current_id(), get_previous_ids())
    for resolving transform URNs across ACES versions, e.g. finding the v2.0
    equivalent of a v1.3 URN or vice versa
  • Add list_versions() to enumerate available ACES system versions

davisadam10 and others added 2 commits March 4, 2026 13:43
* initial commit of aces-amf-lib

Signed-off-by: Chris Clark <chrisc@netflix.com>

* accept string paths in addition to Path objects

Signed-off-by: Chris Clark <chrisc@netflix.com>

* restructure as monorepo and migrate to xsdata-pydantic

- Move aces-amf-lib into packages/ directory
- Add root pyproject.toml with uv workspace config
- Create skeleton packages for aces-amf-transforms and aces-amf-utils
- Regenerate schema bindings with xsdata-pydantic (BaseModel instead of dataclasses)
- Update uri_codec.py, amf_utilities.py, aces_amf.py for Pydantic model API
- Add amf_xml_date_time() helper for XmlDateTime construction
- Fix test fixtures for Pydantic required-fields-at-construction semantics

* implement validation plugin system with registry and core validators

- Add protocols.py with AMFValidator and TransformRegistry protocols
- Create validation/ package with plugin registry supporting entry points
  and explicit registration
- Extract monolithic semantic_validation.py into 9 focused validators:
  temporal, uuid, cdl, metadata, applied_order, file_paths,
  working_space, transform_ids, file_hashes
- Add validate_schema(), validate_semantic(), validate_all() convenience functions
- Core validators auto-register on import via get_default_registry()
- Unified ValidationMessage/ValidationType/ValidationLevel types
- Backward compat: validate_amf alias, SemanticValidationType alias
- Remove old validation.py and semantic_validation.py modules
- Update all tests and examples for new API (45 tests passing)

* add test fixtures as package data

- Copy AMF example files into fixtures/amf-examples/ as package data
- Add fixtures module with get_amf_examples_path() and list_amf_examples()
- Update conftest.py and tests to use package fixtures instead of symlink
- Remove old tests/data/aces-examples symlink
- Update pyproject.toml to include fixture files in package data

* build aces-amf-transforms package with bundled registry

- Implement ACESTransformRegistry with bundled ACES transforms snapshot
  (164 v2.0.0 transforms + 993 v1.3.1 + 7 more version sets)
- Support lookup by ID, previous equivalent IDs, category, and inverse
- Create TransformIdValidator that validates IDs against the registry
- Register validator via aces_amf.validators entry point
- Strip transformUrl from snapshot to reduce size (~1.8MB)
- 15 tests covering registry lookup, listing, and validator integration

* add root .gitignore and remove cached build artifacts

* rewrite public API with auto-validation and remove legacy modules

- Replace aces_amf.py wrapper with functional API in amf_utilities.py
  (load_amf, save_amf, render_amf, minimal_amf, prepare_for_write)
- Add validate=True kwarg to load/save/render for automatic semantic
  validation on all AMF I/O operations
- Add AMFValidationError exception for structured error reporting
- Remove uri_codec.py and backward-compat aliases (validate_amf,
  SemanticValidationType, SemanticValidationMessage)
- Overhaul all 9 semantic validators for improved coverage
- Add nested sub-transform validation (_nested.py)
- Add v1 test fixture and v1→v2 upgrade tests
- Expand test suite to 70 tests

* update transform validator and registry for new validation API

- Adapt validator to work with updated validation types and registry
- Use validate=False in tests for intentionally invalid AMF data
- Remove empty tests/__init__.py
- 16 tests passing

* build out aces-amf-utils with CLI, builder, diff, and templates

- AMFBuilder: fluent builder pattern for AMF construction
- diff.py: structural comparison between AMF objects
- template_registry.py: pre-built AMF templates for common workflows
- bulk_generator.py: generate AMF files from templates for multiple assets
- Click CLI with commands: validate, info, create, convert, diff, edit,
  transforms (entry point: amf)
- 55 tests covering builder, CLI, diff, and template registry

* add xsdata binding generation script

Shell script to regenerate xsdata-pydantic bindings from XSD schemas.
Supports generating v1, v2, or both: ./generate_bindings.sh [v1|v2]

* support compound workingLocation/lookTransform field with ordering preservation

Merge the separate working_location and look_transform fields on PipelineType
into a single compound working_location_or_look_transform list that preserves
element interleaving. The working location is a positional delimiter in the
AMF pipeline — looks before vs after it have different semantic meaning.

- Post-generation patch in generate_bindings.sh merges the two fields into a
  compound field with proper xsdata Elements metadata (v2 only, v1 unaffected)
- Add look_transforms read-only property for filtered access
- Add WorkingLocationType alias for EmptyType (removed EmptyType from public API)
- Add MULTIPLE_WORKING_LOCATIONS validation (ERROR if >1 per pipeline)
- Update v1-to-v2 upgrade to rename lookTransform key for compound field
- Add AMFBuilder.working_location() method for inserting the delimiter
- Update all field references across 3 packages
- Add 11 new tests including interleaved ordering, roundtrip, and validation

* add URI encoding/decoding for xs:anyURI file paths

xsdata passes percent-encoded values through unchanged, creating an
interop risk with other AMF implementations. Add a generic Pydantic
tree walker that auto-decodes file paths on load (unquote) and
re-encodes on save (quote with safe='/'), using a deep copy to avoid
mutating the user's model. Covers all 10 types with file fields
across both pipeline and archived pipeline structures.

* close v1→v2 migration gaps for systemVersion and ColorCorrectionRef

Legacy v1 files that omit systemVersion now parse successfully instead
of failing with a confusing error. The v1 model patches system_version
to optional via generate_bindings.sh, and the upgrade function injects
a default of 1.3.0.

Also adds semantic validation that ColorCorrectionRef must be
accompanied by a file element in v2, emitting a warning when missing.

* Ensure the lock file points external

* regenerate uv.lock with standard PyPI index

Add regenerate_lock.sh script and rebuild uv.lock pointing
to pypi.org/simple instead of internal mirror.

---------

Signed-off-by: Chris Clark <chrisc@netflix.com>
Co-authored-by: Chris Clark <chrisc@netflix.com>
Signed-off-by: Chris Clark <chrisc@netflix.com>
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

@c-clark
Copy link
Copy Markdown
Contributor Author

c-clark commented Mar 4, 2026

Please ignore. This was meant to go to my personal fork.

@c-clark c-clark closed this Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants